/*     */ package com.qmsk.business.member.memberIntegralDetail.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.gson.in.GsonHeadManyRows;
/*     */ import com.utils.gson.in.GsonHeadOneRow;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class MemberIntegralDetailDAO extends SupportDAO
/*     */ {
/*     */   public GsonEbRst getGsonOfAll(Integer nPageIdx, Short nPageSize)
/*     */     throws SQLException
/*     */   {
/*  36 */     return getGsonOfParams("selectSqlOfAll", 
/*  37 */       "selectCountSqlOfAll", "selectJsonOfHead", nPageIdx, nPageSize);
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow getIntAmtMId(Long memberId) throws SQLException {
/*  41 */     Object[] params = { memberId };
/*  42 */     return getOneRowOfParams("selectSqlOfAmt", "selectJsonOfAmt", params);
/*     */   }
/*     */ 
/*     */   public Integer getIntAmtMemberId(Long memberId) throws SQLException {
/*  46 */     Object[] params = { memberId };
/*  47 */     return queryForInt("selectSql_IntAmtOfMemberId", params, Integer.valueOf(0));
/*     */   }
/*     */ 
/*     */   public int updateIntAmtMemberIt(Integer integral, Long memberID) throws SQLException
/*     */   {
/*  52 */     int status = 0;
/*  53 */     Map params = new HashMap();
/*  54 */     params.put("integral", integral);
/*  55 */     params.put("memberID", memberID);
/*  56 */     params.put("status", Integer.valueOf(status));
/*  57 */     return update("updateSqlIntAmtMemberIt", params);
/*     */   }
/*     */ 
/*     */   public int updateIntAmtMemberIt(Integer integral, Long memberID, Long detailId) throws SQLException
/*     */   {
/*  62 */     int status = 0;
/*  63 */     Map params = new HashMap();
/*  64 */     params.put("integral", integral);
/*  65 */     params.put("memberID", memberID);
/*  66 */     params.put("status", Integer.valueOf(status));
/*  67 */     params.put("detailId", detailId);
/*  68 */     return update("updateSqlIntAmtMemberIt", params);
/*     */   }
/*     */ 
/*     */   public int insertBusBillDtialInAmt(Long memberId, Long shopId, Integer intAmt, Integer mberVday, Object billId)
/*     */     throws SQLException
/*     */   {
/*  74 */     if ((mberVday.intValue() == 0) && (mberVday != null)) {
/*  75 */       mberVday = Integer.valueOf(10);
/*  76 */       Object[] params = new Object[] { memberId, shopId, intAmt, 
/*  77 */         mberVday, mberVday, billId };
/*  78 */       return update("insertSqlBusBillInAmtToYear", params);
/*     */     }
/*     */ 
/*  81 */     Object[] params = { memberId, shopId, intAmt, 
/*  82 */       mberVday, mberVday, billId };
/*  83 */     return update("insertSqlBusBillInAmt", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfmemberID(String memberID, String shopId)
/*     */     throws SQLException
/*     */   {
/*  94 */     Map params = new HashMap();
/*  95 */     params.put("memberId", memberID);
/*  96 */     params.put("status", Integer.valueOf(0));
/*  97 */     params.put("shopId", shopId);
/*  98 */     return getGsonOfParams("selectSqlOfAll", "selectJsonOfHead", params);
/*     */   }
/*     */ 
/*     */   public GsonHeadManyRows getSelectMemIntDtialRslt(Object memberId, Object shopId) throws SQLException
/*     */   {
/* 103 */     int status = 0;
/* 104 */     Map params = new HashMap();
/* 105 */     params.put("status", Integer.valueOf(status));
/* 106 */     params.put("memberId", memberId);
/* 107 */     params.put("shopId", shopId);
/* 108 */     return getManyRowsOfParams("selectSqlPaidDetailID", 
/* 109 */       "selectJsonPaidDetailID", params);
/*     */   }
/*     */ 
/*     */   public int updateIntAmtDtlStatusOfID(Long memberId, Long detailId) throws SQLException
/*     */   {
/* 114 */     Object[] params = { detailId, memberId };
/* 115 */     return update("updateIntAmtDtlStatusOfID", params);
/*     */   }
/*     */ 
/*     */   public int updateIntAmtDtlStatusOfIDFs(Long memberId, Long detailId, Integer intAmt) throws SQLException
/*     */   {
/* 120 */     Object[] params = { intAmt, detailId, memberId };
/* 121 */     return update("updateIntAmtDtlStatusOfIDFs", params);
/*     */   }
/*     */ 
/*     */   public int selectIntAmtTotal(Long memberId) throws SQLException {
/* 125 */     Object[] params = { memberId };
/* 126 */     return queryForInt("selectSqlIntAmtTotal", params, Integer.valueOf(0)).intValue();
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfmemberId(Long memberId) throws SQLException {
/* 130 */     Object[] params = { memberId };
/* 131 */     return getGsonOfParams(
/* 132 */       "selectSqlOfmemberId", "selectJsonOfHead", params);
/*     */   }
/*     */ 
/*     */   public int deleteItAmt(Long memberId, Long shopId, Long billId) throws SQLException {
/* 136 */     Object[] params = { memberId, shopId, billId };
/* 137 */     return update("deleteIntAmt", params);
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.member.memberIntegralDetail.dao.MemberIntegralDetailDAO
 * JD-Core Version:    0.5.3
 */